home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
E-Education
/
(c)ed23.d64
/
adding quiz
(
.txt
)
next >
Wrap
Commodore BASIC
|
2007-02-04
|
7KB
|
240 lines
1 GOTO910
2 PRINT"x[169][141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
3 [153]"xSTEPGINPUTSTOPSTEPINPUTONX` (null)(null)STEP(null)INPUTLISTLX(null)xSTEPUINPUTSTOPSTEP(null)INPUTONX`
4 PRINT"xhhh[170]h[168]hhhhhhh[152]H[138]HX`
5 [153]"hhhhhhh`
6 PRINT"[160][255][200][132][251][169][216][133][252] [241][183][138][162][160][255][200][145][251][136][208][251][230][252][202][208][246]`
7 [153]"NEWCLOSE(null)LEFT$>(null)ON(null)LET(null)(null)(null)(null)(null)(null)MID$(null)(null)`
35 SYSUU,15
40 POKEUC,0:POKEUN,0:UR$="":UI$="":IFUL=0THENUL=39
42 IFUL=0THENUL=80
45 GETUI$:IFUI$=""THEN45
50 UA=ASC(UI$):UR=LEN(UR$):IFUA=13ANDUR>0THENPOKEUC,1:PRINT" [157]";:GOTO70
55 IFUA=20THENON-(UR=0)GOTO45:UR$=LEFT$(UR$,UR-1):PRINT"[157] [157][157]";:GOTO45
60 IFUR=ULTHEN45
62 IFLEN(UR$)=>ULTHEN50
65 GOSUB95:UR$=UR$+UI$:PRINTUI$;:GOTO45
70 IFUR$=UX$THENPRINT"[157] ";:GOTO145
75 FORUI=URTO1STEP-1:IFMID$(UR$,UI,1)=" "THENNEXT
80 UR$=LEFT$(UR$,UI):PRINT:RETURN
85 REM +++ CHECK FOR HELP REQUEST +++
90 IF UR$=UX$THEN GOTO 195: REM EXIT T0 HELP ROUTINE
95 IFLEN(US$)=0THEN110
100 FORUI=1TOLEN(US$):IFUI$<>MID$(US$,UI,1)THENNEXT:UI$=""
105 RETURN
110 IFUA=46THENRETURN
115 IFUA=32ANDUR<>0THENRETURN
120 IFUA>47ANDUA<58THENRETURN
125 IFUA>64ANDUA<91THENRETURN
127 US$=US$+UX$
130 IFUA<193ORUA>218THENUI$="":RETURN
135 IFPEEK(UT)=UU%THENUI$=CHR$(UA-128)
140 RETURN
145 GOSUB170:POKE251,0:POKE252,US/256:POKE253,0:POKE254,UF:SYSUV
150 UZ=1:UV%=PEEK(UT):GOTO300
152 IFASC(UI$)=46THENRETURN
155 UZ=0:US$=UJ$:UG$=UK$:UT$=UL$:UP=UJ:UL=UK:PRINT"[147]";:IFUW=0THENPOKEUY,6:POKEUX,14
160 POKEUT,UV%:POKE251,0:POKE252,UF:POKE253,0:POKE254,US/256:SYSUV:IFUW=0THENSYSUU,15
165 POKEU1,U1%:POKEU2,U2%:POKEU3,U3%-1:POKEU4,U4%:GOTO35
170 U1%=PEEK(U1):U2%=PEEK(U2):U3%=PEEK(U3):U4%=PEEK(U4)
175 UJ$=US$:UK$=UG$:UL$=UT$:UJ=UP:UK=UL:RETURN
180 IFASC(UI$)<193ORASC(UI$)>218THENUI$="":RETURN
185 IFPEEK(59468)=12THENUI$=CHR$(ASC(UI$)-128):RETURN
187 RETURN
190 UI$="":RETURN
195 UF=1:REM +++ HELP ROUTINE EXIT +++
197 GOSUB250
200 GOSUB245:UO=PEEK(59468)
205 FORUQ=UBTO(U2%*256+U1%+U3%-2)
210 UQ%(UQ-UB)=PEEK(UQ):NEXT:PRINT"[147]"
215 UZ=1
216 GOTO300
217 UZ=0:US$=UJ$:UL=UJ
218 POKE59468,UO
220 PRINT"[147]";:FORUQ=UBTO(U2%*256+U1%+U3%-3)
225 POKEUQ,UQ%(UQ-UB):NEXT:PRINT"[157]";
230 POKE196,U1%
232 POKE197,U2%
233 POKE216,(U4%)
234 POKE198,(U3%)-1
235 GOTO35
240 UD%=((U2%*256+U1%+U3%)-UB)/40:PRINTLEFT$(UD$,UD%+1):RETURN
245 PRINTLEFT$(UD$,24);" HELP COMING [146] ":RETURN
250 U1%=PEEK(196):U2%=PEEK(197):U3%=PEEK(198):U4%=PEEK(216)
251 UJ$=US$:UJ=UL
255 RETURN
300 PRINT"[147]":POKE53272,21:POKE53280,0:POKE53281,0
305 PRINT" M E N U"
310 PRINT" --------------------------------"
315 PRINT" 1. BEGIN ADDING QUIZ "
320 PRINT" 2. STUDENT INSTRUCTIONS"
325 PRINT" 3. TEACHER INFORMATION"
330 PRINT" 4. RETURN TO DISK MENU
335 [153]" --------------------------------":[141]790:[141]760
340 [153]" PRESS A NUMBER KEY (1-4) ";
345 UL[178]1:US$[178]"1234"
347 [141]35:US$[178]""
350 [145][197](UR$)[141]815,400,500,370
352 [143]: US$=""
353 [143]: PRINTLEFT$(UD$,23);" ONE MOMENT PLEASE "
355 [137]300
370 [153]"LOAD RETURNING TO THE DISK MENU
375 LOAD"MENU",8
380 RUN
385 END
390 SYSUE:PRINT"[154][147]":IFUW=0THENPOKEUY,6:POKEUX,14:SYSUU,14
399 :
400 PRINT"[147]":POKE53272,23:POKE53280,0:POKE53281,0
405 PRINT"[147] [201][206][211][212][210][213][195][212][201][207][206][211] [146]
412 [153]"OPEN (null)HIS PROGRAM TESTS YOUR ABILITIES TO"
414 [153]" DO ADDITION. (null)HE COMPUTER WILL SET UP"
416 [153]" AN ADDITION PROBLEM OF FOUR NUMBERS TO"
418 [153]" BE SOLVED BY YOU. LEFT$OW YOU PLACE YOUR"
420 [153]" ANSWER UNDER THE QUESTION WILL NOT"
422 [153]" AFFECT THE OUTCOME OF THE QUESTION."
424 [153]" ASCOR THIS QUIZ IT WOULD BE ADVISABLE TO"
426 [153]" HAVE SOME PAPER AND A PENCIL TO FOLLOW"
428 [153]" ALONG WITH THE PROGRAM.":[141]820
440 [153]"LOADOPEN (null)OU HAVE FIVE CHANCES AT EACH QUESTION
445 PRINT" AND THE COMPUTER WILL TELL YOU WHICH"
450 PRINT" DIGITS YOU HAVE WRONG."
460 PRINT" [212]HERE WILL BE 10 ADDITION QUESTIONS.
490 [141]820
495 [142]
499 :
500 [151]53272,23:[151]53280,2:[151]53280,2
505 [153]"LOAD (null)VALATNLENLEFT$VAL(null) RIGHT$(null)ASC(null)(null)(null)ATN(null)RIGHT$(null)(null) WAIT
512 PRINT" [208]ROGRAM [206]AME: [193]DDING [209]UIZ"
513 PRINT" [215]RITTEN BY : [202]. [200]ODGE"
514 PRINT" [210]EVISED BY : [196]AVE [196]AKERS"
515 PRINT" [210]EVISED BY : [194]ILL [195]UMBERLAND
518 [153]" FOR
519 PRINT" [195]OMMODORE 64 [195]OMPUTERS
590 [141]835
595 [142]
599 :
700 [143] <YES>
705 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
710 [151]54296,15:[151]54277,42:[151]54278,250
715 [151]54276,23:[151]54273,23:[151]54272,191
720 [129]TS[178]1[164]200:[130]:[151]54276,32:[129]TS[178]1[164]300:[130]
725 [151]54296,0:[142]
730 [143] <NO>
735 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
740 [151]54296,15:[151]54277,18:[151]54278,242
745 [151]54276,33:[151]54273,4:[151]54272,48
750 [129]TS[178]1[164]300:[130]:[151]54276,32:[129]TS[178]1[164]400:[130]
755 [151]54296,0:[142]
760 [143] <BLIP>
765 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130]
770 [151]54296,6:[151]54277,42:[151]54278,250
775 [151]54276,23:[151]54273,23:[151]54272,191
780 [129]TS[178]1[164]30:[130]:[151]54276,32:[129]TS[178]1[164]50:[130]
785 [151]54296,0:[142]
790 [129]TB[178]1[164]500:[130]:[142]
791 [129]TB[178]1[164]1000:[130]:[142]
792 [129]TB[178]1[164]2000:[130]:[142]
793 [129]TB[178]1[164]3000:[130]:[142]
799 :
800 [153]"LOAD";:[151]53272,21:[151]53280,1:[151]53281,1
801 [129]I[178]1[164]38:[153]" WAIT";:[130]
802 [129]I[178]1[164]22:[153]"CMD WAIT";:[130]
803 [129]I[178]1[164]37:[153]"CMDCMD WAIT";:[130]
804 [129]I[178]1[164]22:[153]"ONCMD WAIT";:[130]
805 [153]"STEP WAIT
806 PRINT" [146] [146][169]
807 [153]" WAIT TAB((null)WAIT O M M O D O R E
808 PRINT"[223] [146]
809 [153]" ONTARIO EDUCATIONAL SOFTWARE 1983
810 PRINT" ADDING QUIZ [146]":GOSUB760:GOSUB790
812 PRINTLEFT$(UD$,24);"[154]PRESS SPACE BAR OR WAIT[146]"UC$:UI=0
813 GETUI$:IFUI$<>CHR$(32)THENUI=UI+1:IFUI<250THEN813
814 GOTO300
815 PRINT"[147]AND AWAY WE GO........."
817 GOTO 1000
820 POKEUN,0:PRINTLEFT$(UD$,24);"[154] [208]RESS [211][208][193][195][197] [194][193][210] TO CONTINUE [146][155]"
822 GETUI$:IFUI$<>CHR$(32)THEN822
824 RETURN
835 POKEUN,0:PRINTLEFT$(UD$,24);"[154] PRESS SPACE BAR TO CONTINUE [146][155]"
840 GETUI$:IFUI$<>CHR$(32)THEN840
845 RETURN
850 UP=UP+1:PRINT"[147]"LEFT$(UT$+UP$,21);RIGHT$(UP$+UG$+STR$(UP),18)
855 PRINT" --------------------------------------"
860 PRINT" >>> "NA$
865 PRINTLEFT$(UD$,24);LEFT$(UP$,6);"ANSWER - THEN PRESS <RETURN> "
870 UH=0:PRINT"":RETURN
875 PRINTLEFT$(UD$,24);" ONE MOMENT PLEASE... ":RETURN
899 :
900 US=1024:U1=209:U2=210:U3=211:U4=214:UC=204:UB=2048:UX=53280:UD=2064
902 UT=53272:UU%=21:UL%=23:UP%=2151:UN=198:UY=53281:UU=2199:UE=2087
904 UC$=CHR$(155):UV=1214:UF=196:UV=2238
905 UD$="":UP$=" "
909 RETURN
910 GOSUB900:PRINT"[147] "
970 GOSUB800:GOTO300
999 :
1000 PRINT"[147]"UC$;:RESTORE:POKE53280,6:POKE53281,6:POKE53272,21
1010 PRINT"[147] WHAT IS YOUR NAME?":GOSUB760
1020 INPUT" >>> ";NA$
1110 RESTORE:FOR C=1 TO6:READA$(C):NEXT C
1120 FOR Z=1 TO6:READB$(Z):NEXT Z
1130 VV=0
1150 UT$=" ADDING DRILL":UG$="":UP=0
1160 GOSUB850
1170 PRINT" LET'S PRACTISE OUR ADDING, SHALL WE?":GOSUB760:GOSUB760
1210 Z=0:FOR Q=1 TO 10:GOSUB835
1220 Y=0:VV=0:UG$="ADDITION PROBLEM":UP=Q-1
1230 REMPRINT"[147]ADDITION PROBLEM #"Q
1235 GOSUB850:PRINT""
1240 FORYQR=1 TO 4
1250 X=INT(9999*RND(1)+1)
1260 Y=Y+X
1270 IFX<10THENPRINTTAB(19);X:GOTO1340
1290 IFX<100THENPRINTTAB(18);X:GOTO1340
1310 IFX<1000THENPRINTTAB(17)X:GOTO1340
1330 PRINT" ";X
1340 NEXTYQR
1350 PRINT" +[210][210][210][210]":GOSUB760
1360 PRINT" ANSWER IS [157][157][157][157][157][157]";:GOSUB865:PRINT""TAB(16)
1370 US$="0123456789":UL=5:GOSUB35:CD=VAL(UR$)
1380 PRINT
1390 PRINT
1400 IF CD=Y GOTO 1600
1410 V=INT(6*RND(1)+1)
1420 PRINT"[145] "B$(V):VV=VV+1
1430 IFVV=5THENPRINT"[150] MUST BE TOO TOUGH FOR YOU."
1435 IFVV=5THENPRINT" ANSWER WAS"Y:VV=O:GOTO 1620
1440 Q1=INT(Y/10000):Q2=(INT(Y/1000))-(10*Q1)
1450 Q3=(INT(Y/100))-((100*Q1)+(10*Q2))
1460 Q4=(INT(Y/10))-((1000*Q1)+(100*Q2)+(10*Q3))
1470 Q5=Y-((10000*Q1)+(1000*Q2)+(100*Q3)+(10*Q4))
1480 Z1=INT(CD/10000):Z2=(INT(CD/1000))-(10*Z1)
1490 Z3=(INT(CD/100))-((100*Z1)+(10*Z2))
1500 Z4=(INT(CD/10))-((1000*Z1)+(100*Z2)+(10*Z3))
1510 Z5=CD-((10000*Z1)+(1000*Z2)+(100*Z3)+(10*Z4))
1520 IF Q1<>Z1 THEN PRINT" WRONG 10000'S COLUMN":GOSUB730
1530 IF Q2<>Z2 THEN PRINT" WRONG 1000'S COLUMN":GOSUB730
1540 IF Q3<>Z3 THEN PRINT" WRONG 100'S COLUMN":GOSUB730
1550 IF Q4<>Z4 THEN PRINT" WRONG 10'S COLUMN":GOSUB730
1560 IF Q5<>Z5 THEN PRINT" WRONG UNITS COLUMN":GOSUB730
1590 GOSUB835:PRINT"";:FORI=1TO7:PRINTUP$:NEXTI
1595 PRINT"";:GOTO1360
1600 W=INT(6*RND(1)+1)
1610 GOSUB700:PRINT"[158] "A$(W):Z=Z+1
1620 NEXT Q:GOSUB835
1630 DATA CORRECT SIR
1640 DATA NICE GOING EINSTEIN
1650 DATA RIGHT ON THE MONEY
1660 DATA PERFECT RESPONSE
1670 DATA HEY YOU'RE GETTIN' GOOD
1680 DATAA STAR IS BORN CORRECT EUCLID
1690 DATA INCORRECT BUT CLOSE
1700 DATA NICE BUT NOT RIGHT
1710 DATA NOT THIS TIME
1720 DATA KEEP TRYING!
1730 DATA GETTING CLOSER
1740 DATA TRYING TOO HARD JUST RELAX
1750 UP=0:UG$="RESULTS":GOSUB850:PRINT" YOUR PERCENTAGE IS";Z*10;"%"
1770 GOSUB835:RETURN
2000 REM WHC 95:05:20